Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] logq: fix Distinct operator returning too many log lines #9624

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

liguozhong
Copy link
Contributor

@liguozhong liguozhong commented Jun 5, 2023

What this PR does / why we need it:

Added a global filter function for distinct. Applied in 2 modules.

1: After the querier queries multiple instances and s3. Do a global filter on the final result.
2: Do a global filter on each split result after split by time.

alternative:
We can also introduce a global state map to fix this bug, but this introducing a state is a huge work.

Which issue(s) this PR fixes:
Fixes #9594 #8662

Special notes for your reviewer:
fix distinct result. only return 3 log .
image

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Distinct operator returning too many log lines
1 participant